package com.ideal.manage.esms.config.swagger;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

import static com.google.common.base.Predicates.not;
import static springfox.documentation.builders.RequestHandlerSelectors.basePackage;

//
//@Configuration
//@EnableSwagger2
//public class SwaggerConfig {
//    @Bean
//    public Docket groupDemoDocket() {
//        return new Docket(DocumentationType.SWAGGER_2).groupName("esms").select().apis(
//                basePackage("com.ideal.manage.esms.controller")).build().apiInfo(apiInfo());
//    }
//
//    @Bean
//    public Docket groupHealthDocket() {
//        return new Docket(DocumentationType.SWAGGER_2).groupName("Health").select().apis(
//                not(basePackage("com.ideal.manage.esms.controller"))).build().apiInfo(apiInfo());
//    }
//
//
//    private ApiInfo apiInfo() {
//        final ApiInfo apiInfo = new ApiInfo("My REST API", "Some custom description of API.", "API TOS", "Terms of service", "myeaddress@akcome.com", "License of API", "API license URL");
//        return apiInfo;
//    }
//}